/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package stis.statpro.ibs.datasource;

/**
 *
 * @author habib <imamhabibpamungkas@gmail.com>
 */
public class QueryClass {
    public static final String SAVEDATA="INSERT INTO `ibs`.`perusahaan` (`kip`, `propinsi`, `kabupaten`, `kotaAdmin`, `kecamatan`, `desaKelurahan`, `namaPerusahaan`, `alamatPerusahaan`, `kodePosPerusahaan`, `emailPerusahaan`, `teleponPerusahaan`, `faxPerusahaan`, `alamatKantorPusat`, `kodePosPusat`, `emailPusat`, `teleponPusat`, `faxPusat`, `statusPenanamanModal`, `lokasiPusat`, `asetBangunan`, `asetKendaraan`, `asetMesin`, `asetGadget`, `asetLain`, `asetDlmRupiah`, `tenagaKerja`, `omzetSebulan`,`tanggalInput`,`statusUpdate`) VALUES ( ?,?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);";
    public static final String SELECTBYPROP="select * from perusahaan where propinsi like ?;";
    public static final String SELECTBYKAB="select * from perusahaan where kabupaten like ?";
    public static final String SELECTBYNAMA="select * from perusahaan where namaPerusahaan like ?;";
    public static final String SELECTBYKIP="select * from perusahaan where kip=?";
    public static final String DELETEDATA="Delete from perusahaan where kip=?";
    public static final String SELECTALLDATA="Select * from perusahaan;";
    public static final String GETJUMLAHRECORD="SELECT COUNT(*) FROM perusahaan where statusUpdate=1;";
    public static final String GETCOUNTSTATUSMODAL="SELECT COUNT(statusPenanamanModal) AS modal FROM perusahaan where statusPenanamanModal like ? AND statusUpdate=1;";
    public static final String GETLOKASI="SELECT COUNT(lokasiPusat) AS lokasi FROM perusahaan where lokasiPusat like ? AND statusUpdate=1;";
    public static final String GETAVERAGE="SELECT AVG(omzetSebulan) AS Average from perusahaan where statusUpdate=1";
    public static final String GETSUMTENAGA="SELECT SUM(tenagaKerja) AS jumlah from perusahaan where statusUpdate=1";
    public static final String GETUPDATE="UPDATE perusahaan set statusUpdate=0 where kip=?";
}
